import React, { useState } from 'react'
import Child from './Child'

export default function App() {
  const [isShow, setIsShow] = useState(true)
  return (
    <div>
      <h1>App</h1>
      <button onClick={() => setIsShow(!isShow)}>切换</button>
      {isShow && <Child></Child>}
    </div>
  )
}
